[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
VS_AddRec()          Add a new record by re-using deleted records

Description:

  VS_AddRec() adds a new record to the database file associated with the
  current work area.  It will first attempt to RECALL a record marked
  for deletion.  If successfully added or recalled, each field in the
  new record is set to the empty value for its field type and the new
  (or recalled) record becomes the current record.

Syntax:     

  l_Success = VS_AddRec()

Pass:       

  Nothing

Return:     

  l_Success is a logical expression that will be set to .T. if
  successful, otherwise .F.

Notes:      

  . Logical Records:  VS_AddRec() does not respect the logical
  visibility.  That is, if the record is successfully recalled/added, it
  becomes the current record regardless of any index or filter
  condition.

  . Network Environment:  For a shared database on a network,
  VS_AddRec() automatically places a record lock on the new record.  If
  the record cannot be locked, it is not added (or recalled) and
  VS_AddRec() will set l_Success to .F.

Example:    

  IF .NOT. VS_AddRec()
     VS_DIE( "Unable to add a new record!" )
  ENDIF

Usage:      

  VS_AddRec() (when used with VS_DelRec()) totally eliminate the need to
  ever PACK a database file.

See Also: VS_DelRec()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson